import http from '@/utils/http2.js'

/**
 * 字典查询
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function queryDict(data) {
  return http.post("/api/dictionary?code="+data, {})
}

/**
 * 新增
 * @param {*} data 
 * @returns 
 */
export function saveDict(data) {
  return http.post("/api/dictionary/save",data)
}

/**
 * 修改
 * @param {*} data 
 * @returns 
 */
export function updateDict(data) {
  return http.put("/api/dictionary", data)
}

/**
 * 删除
 * @param {*} data 
 * @returns 
 */
export function delDict(data) {
  return http.delete("/api/dictionary", data)
}